﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="LN.WebFileManager.Upload.ProgressBar,WebFileManager, Version=1.0.0.0"  %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Upload</title>
	<script src="/Script/SWFUpload.js" type="text/javascript"></script>
    <link href="/CSS/SWFStyle.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
        #divStatus{ display:none;}
    </style>
</head>
<body>
    <script type="text/javascript">
        var swfu;

        window.onload = function () {
            var settings = {
                flash_url: "/Script/swfupload.swf",
                upload_url: "/ProgressBar.aspx?username=<%=CookieUserName %>",
                post_params: { "SessionID": "<%=UploadId %>" },
                file_size_limit: "20 MB",
                file_types: "*.*",
                file_types_description: "Upload Files",
                file_upload_limit: 100,
                file_queue_limit: 0,
                custom_settings: {
                    progressTarget: "fsUploadProgress",
                    cancelButtonId: "btnCancel"
                },
                debug: false,

                // Button settings
                button_image_url: "/css/XPButtonUploadText_61x22.png",
                button_width: "61",
                button_height: "22",
                button_placeholder_id: "spanButtonPlaceHolder",

                // The event handler functions are defined in handlers.js
                file_queued_handler: fileQueued,
                file_queue_error_handler: fileQueueError,
                file_dialog_complete_handler: fileDialogComplete,
                upload_start_handler: uploadStart,
                upload_progress_handler: uploadProgress,
                upload_error_handler: uploadError,
                upload_success_handler: uploadSuccess,
                upload_complete_handler: uploadComplete,
                queue_complete_handler: queueComplete	// Queue plugin event
            };

            swfu = new SWFUpload(settings);
        };
	</script> 
    <form id="uploadForm" action="/ProgressBar.aspx" method="post" enctype="multipart/form-data" >  
			<div class="fieldset flash" id="fsUploadProgress">
			<span class="legend">Upload Queue</span>
			</div>
		    <div id="divStatus">0 Files Uploaded</div>			<div style="padding-left: 5px;">
				<span id="spanButtonPlaceHolder"></span>
				<input id="btnCancel" type="button" value="Cancel" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left:10px; font-size: 8pt; height: 22px;" />
			</div>
    </form>  
</body>
</html>